package edu.guet.cn.blogbasics.service.impl;

import edu.guet.cn.blogbasics.entity.Worksheet;
import edu.guet.cn.blogbasics.mapper.WorksheetMapper;
import edu.guet.cn.blogbasics.service.WorksheetService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author hejianding
 * @since 2021-04-23
 */
@Service
public class WorksheetServiceImpl extends ServiceImpl<WorksheetMapper, Worksheet> implements WorksheetService {
    @Autowired
    WorksheetMapper worksheetMapper;

    @Override
    public List<Worksheet> selectWorksheetByUserName(String userName) {
        return worksheetMapper.selectWorksheetByUserName(userName);
    }

    @Override
    public void updateWorksheet(Worksheet worksheet) {
         worksheetMapper.updateWorksheet(worksheet);
    }

    @Override
    public void deleteWorksheet(Worksheet worksheet) {
        worksheetMapper.deleteWorksheet(worksheet);
    }
}
